package org.gw.building.repositories;

import org.gw.building.model.CommonFile;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

public interface FileRepository extends CrudRepository<CommonFile, String> {

	@Query("from CommonFile f where (?1 is null or f.name like (?1) or f.wjsm like ?1) order by f.scsj desc")
	public Page<CommonFile> query(String name, Pageable pageable);

}